package Hws;

public class Mouse {
        private String name;

        public Mouse(String name){
            this.name = name;
        }
        void printInfo(){
            System.out.println("大家好，我是"+name);
        }
        void squeak(){
            System.out.println(name+":吱吱吱");
        }
        void stealFood(){
            System.out.println(name+"偷吃鱼啦");
        }
        public void setName(String name){
            this.name = name;
        }
        public String getName(){
            return name;
        }
        public static void main(String[] args) {
            Mouse mouse = new Mouse("Jerry");
            mouse.stealFood();
            mouse.squeak();
        }
    }

